//将home下所有路由定义在此处
// 一个路由配置要满足的条件，必须符合一个routes的格式  一个数组，里面有很多的对象，对象中使用path对应component

//用户路由 除了登录和404界面以外所有界面  需要进行鉴权才能访问

// const allRoutes = [
//     {
//         path:"Attendance",
//         component:()=>import(/* webpackChunkName:"attendance*/"../pages/Home/Attendance"),
//         meta:{
//             icon:"iconfont icon-xxx",
//             fullPath:"/Attendance"
//         }
//     }
// ]

const allRoutes = [
  {
    path: "welcome",
    component: () =>
      import(/*webpackChunkName:"welcome" */ "../pages/Home/Welcome"),
    name: "welcome",
    meta: {
      //储存一些属性
      fullPath: "/welcome",
      icon: "iconfont icon-index-copy", //可以自定义
      name: "管理首页", //这个属性很重要,作用是用于和后台菜单数据进行对比
    },
  },
  {
    path: "studentManager",
    component: () =>
      import(
        /*webpackChunkName:"studentManager" */ "../pages/Home/StudentManager"
      ),
    name: "studentManager",
    redirect: "/studentManager/product",
    meta: {
      //储存一些属性
      fullPath: "/studentManager",
      icon: "iconfont icon-xueyuan",
      name: "学员管理",
    },
    children: [
      {
        path: "dormitory",
        component: () =>
          import(
            /*webpackChunkName:"dormitory" */ "../pages/Home/StudentManager/StudentDormitory"
          ),
        name: "dormitory",
        meta: {
          //储存一些属性
          fullPath: "/studentManager/dormitory",
          icon: "iconfont icon-sushe",
          name: "学员宿舍",
        },
      },
      {
        path: "product",
        component: () =>
          import(
            /*webpackChunkName:"product" */ "../pages/Home/StudentManager/StudentProduct"
          ),
        name: "product",
        meta: {
          //储存一些属性
          fullPath: "/studentManager/product",
          icon: "iconfont icon-xiangmu",
          name: "学员项目管理",
        },
      },
      {
        path: "profill",
        component: () =>
          import(
            /*webpackChunkName:"profill" */ "../pages/Home/StudentManager/StudentProfill"
          ),
        name: "profill",
        meta: {
          //储存一些属性
          fullPath: "/studentManager/profill",
          icon: "iconfont icon-gerenziliao2",
          name: "学员资料",
        },
      },
    ],
  },
  {
    path: "users",
    component: () =>
      import(/*webpackChunkName:"users" */ "../pages/Home/Users"),
    name: "users",
    meta: {
      //储存一些属性
      fullPath: "/users",
      icon: "iconfont icon-27",
      name: "用户管理",
    },
  },
  {
    path: "attendance",
    component: () =>
      import(/*webpackChunkName:"attendance" */ "../pages/Home/Attendance"),
    name: "attendance",
    meta: {
      //储存一些属性
      fullPath: "/attendance",
      icon: "iconfont icon-kaoqin",
      name: "考勤管理",
    },
  },
  {
    path: "statistics",
    component: () =>
      import(/*webpackChunkName:"statistics" */ "../pages/Home/Statistics"),
    name: "statistics",
    meta: {
      //储存一些属性
      fullPath: "/statistics",
      icon: "iconfont icon-shuju",
      name: "数据统计",
    },
  },
  {
    path: "mine",
    component: () => import(/*webpackChunkName:"mine" */ "../pages/Home/Mine"),
    name: "mine",
    meta: {
      //储存一些属性
      fullPath: "/mine",
      icon: "iconfont icon-wode",
      name: "我的中心",
    },
  },
];

export default allRoutes;
